I can't build with Xcode 11
Closed this issue ยท 10 comments
Hey
I'm trying to build my app with Mixpanel plugin 4.6.2, and the build failed, Xcode 11 gave me this message:
/Plugins/cordova-plugin-mixpanel/Mixpanel/MixpanelWatchProperties.m:10:9: WatchKit is not available when building for iOS Simulator. Consider using #if !TARGET_OS_IOS
to conditionally import this framework, first importing TargetConditionals.h if necessary.
I don't understand what is the problem, because it worked good with Xcode 10
Any help?
someone had a similiar problem with xcode 11 while it was in beta:
#104 (comment)
there's some deprecation of watchkit framework or something like that.
the cordova-iphone sdk still has some watchkit related files.
lets wait a couple of days to see if cordova-iphone solves this watchkit deprecation from their side.
if they can't, i can remove the watchkit related code on this lib directly.
it would mean however, that no-one would be able to use this cordova plugin for watch builds, though i'm not sure if it even happened...
and if you must build in the meanwhile, use xcode 10.
if you alreayd upgraded to 11, there's some way to d/l older versions and install them, google for it
Hi, this message is just to let you guys know that we are experiencing the same problem. We heavily rely on mixpanel's cordova plugin and since a few days we had to remove mixpanel's plugin from our app... So a solution/work around would be greatly appreciated!
@samzilverberg Is there an update on this? The release notes clearly states that it's no longer part of iOS SDK. WatchKit
need to be removed (or at the least made conditional) for apps not using WatchOS
.
The WatchKit framework is no longer included in the iOS SDK. If youโre using WatchKit APIs from iOS, you need to remove this use. The WatchKit framework remains available on watchOS.
Ref: 49707950
Xcode 11 is required for testing devices with iOS 13. Please provide an update if you have looked into it a bit more.
Regarding your comment:
if you alreayd upgraded to 11, there's some way to d/l older versions and install them, google for it
I tried searching for a solution for it but wasn't able to find a workable solution. Do you mind providing a link to solution you are referring to?
@amayvs ty for the info. didn't know that xcode 11 is a hard requirement for building for ios 13.
i'll try to publish a version tomorrow with sdk updates & removal of any watch related files and references. can't really test it myself, it'l be some sort of "blind" release. so hopefully users (you and others) can test fast and let me know if it works.
i released:
4.6.3: with latest sdk libs
4.7.0: with removal of watch related code
was able to compile both on xcode 10, didn't get a chance to try xcode 11 because it takes too long to d/l & install ๐คฆโโ
try out 4.7.0 and let me know if can build via xcode 11
@samzilverberg I can confirm that 4.7.0
works as expected with Xcode 11. Thanks for the quick turnaround.
@samzilverberg I can confirm as well that 4.7.0 works as expected with Xcode, thanks for the fix!
Is this issue resolved?
Yes, the issue resolved. Thanks to all contributing people!