Archived my app and uploaded it to iTunes Connect.
I expected Apple to approve my app after processing it.
My app was automatically rejected and I received the following email:
Invalid Swift Support - The Watch OS application has Swift libraries at both /Payload/Today's Menu.app/TodaysReactiveMenuWatch.app/TodaysReactiveMenuWatch Extension.appex/Frameworks/ and /Payload/Today's Menu.app/TodaysReactiveMenuWatch.app/Frameworks/. Remove all of the Swift libraries from one of the locations and resubmit your app.
Podfile
use_frameworks!
# ignore all warnings from all pods
inhibit_all_warnings!
def shared_pods
pod 'ReactiveCocoa', '4.0.1'
pod 'Alamofire', '~> 3.1.4'
pod 'Unbox', '~> 1.3'
end
target 'TodaysReactiveMenu' do
platform :ios, '9.0'
shared_pods
pod 'Fabric', '~> 1.6.0'
pod 'Crashlytics', '~> 3.4.0'
pod 'PureLayout', '~> 3.0.1'
end
target 'TodaysReactiveMenuTests' do
end
target 'TodaysReactiveMenuWatch Extension' do
platform :watchos, '2.0'
shared_pods
end
Running CocoaPods v. 1.0.0.beta.6
and Xcode 7.2.1
. My project contains an iOS app as well as a watchOS app. All targets has the flag "Embedded Content Contains Swift Code" set to YES as all of my source files are written Swift.
@neonichu I'm pretty sure we have existing issues for the watchOS problems?
I got a tip on Stack Overflow, and setting the Embedded Content Contains Swift Code
to NO
on the app target and setting it to YES
on the extension target made it work 馃帀 Feel free to close this issue.
How are did you implement this build setting on Xcode 9? Embedded Content Contains Swift Code
is no longer available and has been replaced by ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
. Based on what I could find on StackOverflow I came up with this Podfile hook, but it does not seem to work properly.
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Example Watch Extension'
target.build_configurations.each do |config|
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
end
end
if target.name == 'Example'
target.build_configurations.each do |config|
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
end
end
end
end
How can this be solved properly using Xcode 9?
Most helpful comment
I got a tip on Stack Overflow, and setting the
Embedded Content Contains Swift Code
toNO
on the app target and setting it toYES
on the extension target made it work 馃帀 Feel free to close this issue.