Req Fullscreen mode button in Kodi Remote
#16
Thanks to both of you for your patient help.Sorry for my late reply but we may have identifued a couple of things

(1) I downloaded the soure code .zip files from 1.6.. through 1.10.1 (except for 1.8). They all build and simulate EXCEPT 1.10 and 1.10.1which give me an error:

/Volumes/Data/Downloads/Official-Kodi-Remote-iOS-1.10 2.1/XBMC Remote/DetailViewController.m:5192:29: error: property 'backButtonTitle' not found on object of type 'UINavigationItem *'
        self.navigationItem.backButtonTitle = labelText;
                            ^
1 error generated.

(2) I have Xcode Version 11.3.1 and Mojave 14.6 on my Early 2009 MacPro. This may be the problem. As you pointed out:

"The code definitely compiles with XCode 12 and 13 -- the AppStore version was built with XCode 12, the current TestFlight version already used XCode 13. Maybe you used an older version of XCode with an older SDK?"

(3) Since I do NOT instal patched versions of macOS (even though some are available for my ancient Hw) I am stuck at the versions listed above.

(4) Conclusion: Since Kodi Remote 1.9 builds on my gear (only 2 warnings) I will make a branch, and use that if I want to change things.
Buying more uptodate HW is not on the table at this time for a number of reasons. One of which is that I am in the middle of a personal project wrt MIDI.

So my respet and gratitude to both of you for your generous and kind help.

Peter
Reply
#17
P.S.
Gandalf:~ pteeson$ xcodebuild -showsdks
iOS SDKs:
    iOS 13.2                          -sdk iphoneos13.2

iOS Simulator SDKs:
    Simulator - iOS 13.2              -sdk iphonesimulator13.2
Reply
#18
(1) Msybe it's nothing to do with my gear and versions. the IOS versions seem pretty reasonable 13.2

(2) The error message is "Property 'backButtonTitle' not found on object of type 'UINavigationItem *'

The eror occurs at line 5192 of method - (void)displayData in class DetailViewController which is in the iPhone folder
If I comment that line out it builds.
I did read the code around that area and it seems fairly straight forward.

I checked the properties declarations ans sure enough it's not there.

(3) I tried adding and synthwisizeing it but didn't get that to work but didn't spend much time at it and removed my changes.

(4) To me the KEY QUEStION is "Why does the Official source code for 1.10.1 have a compile error and yet the App store version runs?
To me that indicates a mismatch. They can't both be right.

May the the source sould be corrected?

respect
Reply
#19
@pteeson every GitHub release also has prebuilt binary - ipa file, you only need to sign it (e.g. with https://dantheman827.github.io/ios-app-signer/ or AltStore) and then you can install it on your device.
(2022-06-05, 02:05)pteeson Wrote: (4) To me the KEY QUEStION is "Why does the Official source code for 1.10.1 have a compile error and yet the App store version runs?
To me that indicates a mismatch. They can't both be right.

because you're compiling against an older iOS SDK that doesn't have the respective symbol. Distribution through AppStore requires using the latest toolchain (max. ~1 year old). Current required iOS SDK is 15, and you have 13.

if you're interested how such behaviour is achieved, the code makes runtime check for OS version to determine if the symbol is available or not (the @available expression inside if above).

But I've just checked the code in question: the property is available since iOS 11 and should definitely compile on your side against iOS 13 SDK. I'm puzzled why compiler throws the error. If you'd like to investigate, open UINavigationItem header file (e.g. Command-click the type in Xcode) and check if the property is present there or not. Also just in case check the SDK version that contains the header, it should be visible right above the file viewer.
Reply
#20
When removing the if(@ available) check the warning "'setBackButtonTitle:' is only available on iOS 11.0 or newer" is thrown. Also Apple Developer Documentation states the same: available for iOS 11.0+.
Reply
#21
@"kambala Thanks for your guidance. Previously I had already follwed the path you just suggested but failed.

Now I've taken more time and Iv'e found the problem!

I looked more carefully  at the  // UINavigationItem.h in // UIKit //Copyright © 2016-2018 Apple Inc. All rights reserved. and found this:
Quote:@property(nullable,nonatomic,strong) UIBarButtonItem *backBarButtonItem API_UNAVAILABLE(tvos); // Bar button item to use for the back button in the child navigation item
The source code said :    self.navigationItem.backButtonTitle = labelText;
It should say:                 self.navigationItem.backBarButtonItem = labelText;

Simple typo error.

However that still leaves us with what to do to correct the .zip and tar ball sources.

respect
Reply
#22
(2022-06-05, 22:44)pteeson Wrote: Simple typo error.

no, this is not an error, otherwise we wouldn't have been able to build as well. We never said that the app code is buildable with any Xcode version / any iOS SDK.

It seems that this symbol became public only in iOS 14 SDK, that's why it fails to build against older SDKs. I've also checked the header in different Xcodes: the symbol is missing from all Xcode versions below 12.
Reply
#23
(2022-06-06, 09:44)kambala Wrote: It seems that this symbol became public only in iOS 14 SDK, that's why it fails to build against older SDKs. I've also checked the header in different Xcodes: the symbol is missing from all Xcode versions below 12.
Shall we then change the code to if (@available(iOS 12.0, *)) to avoid potential compile problems with older environments?
Reply
#24
@Buschel not sure why you chose 12 if it should be 14 by that logic Smile

FYI just tested backButtonTitle on iOS 12: works correctly. I believe the minimum iOS version specified in the header is correct.
Reply
#25
My brain is starting to hurt.... I am not trying to be difficult... Just so confused...

(1)In Xcode here is one target: Kodi Remote. I set Destination to iPad Air 2
(2) Selecting the target and displaying the General menu we see
Deployment Info
                               Target    Device
                               ios 9.0   √iPhone
                                            √iPad
(3) We know my iOS is 13.2 and my Xcode is 11.3.1
(4) I could not find anything in the READ ME documentation saying Xcode 12 is the required minimum. Is this just folk lore?
(5) The reference to self.navigationItem.backButtonTitle is not found by the compiler because that
     @property is not listed in the UINavigationItem.h header. (2016 - 2018)
(6) Apple's documentation of backButtonTitle availability says iOS 11+ and iPadOS 11+. Apparently not!

This is  mess. Not Kodi Remote but why my setup will not compile. Based on your comments it should!
I don't think it has anything to do with Xcode 11 vs 12. The SDK header just does not have the @property backButtonTitle.

All my Apple SW is only instlled via Apple Installers. Never patched except by Apple SW updates.

I am going to take a break from this beause it's interfearing with my main project.

Thank you both for your patience. But the issue still remains unresolved as far as I am concerned.
Reply
#26
@pteeson, for you the easiest will be to just comment the line which fails to compile for you and move on. This should not have any effect on the iPad anyhow.
Reply
#27
(2022-06-06, 21:59)pteeson Wrote: (4) I could not find anything in the READ ME documentation saying Xcode 12 is the required minimum. Is this just folk lore?

ok, we'll state this in readme explicitly. There's a simple rule of a thumb (I believe you're not aware of it as most people who are not iOS devs): if an app has recently been updated in the appstore, then it is/must be built with the modern/recent toolchain to comply with AppStore requirements, anything older doesn't matter.
(2022-06-06, 21:59)pteeson Wrote: (6) Apple's documentation of backButtonTitle availability says iOS 11+ and iPadOS 11+. Apparently not!

please re-read my previous message:
(2022-06-06, 09:44)kambala Wrote: It seems that this symbol became public only in iOS 14 SDK, that's why it fails to build against older SDKs. I've also checked the header in different Xcodes: the symbol is missing from all Xcode versions below 12.

The symbol used to be private it seems, but starting with iOS 14 SDK it's public. Only the iOS SDK app is built against matters. It means that you can still use this symbol when compiling against older SDK, but you should resolve it at runtime. You can adjust the code in the following way: replace line
Code:
self.navigationItem.backButtonTitle = labelText;
with
Code:
SEL sel = NSSelectorFromString(@"setBackButtonTitle:");
if ([self.navigationItem respondsToSelector:sel])
  [self.navigationItem performSelector:sel withObject:labelText];
Reply

Logout Mark Read Team Forum Stats Members Help
Fullscreen mode button in Kodi Remote0