Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28159] IOS: Building module created with sdk < 9.2.0.GA fails

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-10-06T15:53:17.000+0000
Affected Version/sRelease 9.2.0
Fix Version/sRelease 9.2.1
ComponentsiOS
Labelsn/a
ReporterLokesh Choudhary
AssigneeVijay Singh
Created2020-10-02T00:26:43.000+0000
Updated2020-10-06T15:53:17.000+0000

Description

Steps to reproduce:

1. Create an IOS swift module with SDK 9.1.0.GA. 2. Build the module with SDK 9.2.0.GA.

Actual result:

1. The build fails with:
[TRACE] [xcode-sim] ld: warning: ignoring file /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.2.0.GA/iphone/Frameworks/TitaniumKit.xcframework/ios-arm64_armv7/TitaniumKit.framework/TitaniumKit, missing required architecture i386 in file /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.2.0.GA/iphone/Frameworks/TitaniumKit.xcframework/ios-arm64_armv7/TitaniumKit.framework/TitaniumKit (2 slices)
[TRACE] [xcode-sim] Undefined symbols for architecture i386:
[TRACE] [xcode-sim]   "_OBJC_METACLASS_$_TiModule", referenced from:
[TRACE] [xcode-sim]       _OBJC_METACLASS_$_ComAppTestmodModule in ComAppTestmodModule.o
[TRACE] [xcode-sim]   "_OBJC_CLASS_$_TiUtils", referenced from:
[TRACE] [xcode-sim]       objc-class-ref in ComAppTestmodExampleProxy.o
[TRACE] [xcode-sim]   "_OBJC_CLASS_$_TiApp", referenced from:
[TRACE] [xcode-sim]       objc-class-ref in ComAppTestmodModule.o
[TRACE] [xcode-sim]   "_OBJC_CLASS_$_TiModule", referenced from:
[TRACE] [xcode-sim]       type metadata for ComAppTestmod.ComAppTestmodModule in ComAppTestmodModule.o
[TRACE] [xcode-sim]   "_OBJC_CLASS_$_TiProxy", referenced from:
[TRACE] [xcode-sim]       type metadata for ComAppTestmod.ComAppTestmodExampleProxy in ComAppTestmodExampleProxy.o
[TRACE] [xcode-sim]   "_OBJC_METACLASS_$_TiProxy", referenced from:
[TRACE] [xcode-sim]       _OBJC_METACLASS_$_ComAppTestmodExampleProxy in ComAppTestmodExampleProxy.o
[TRACE] [xcode-sim] ld: symbol(s) not found for architecture i386
[TRACE] [xcode-sim] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] [xcode-sim] ** ARCHIVE FAILED **
[ERROR] [xcode-sim] The following build commands failed:
[ERROR] [xcode-sim] 	Ld /Users/lchoudhary/Library/Developer/Xcode/DerivedData/testmod-awzexlutojiwrcgsjrvqzxeidfou/Build/Intermediates.noindex/ArchiveIntermediates/ComAppTestmod/IntermediateBuildFilesPath/testmod.build/Release-iphonesimulator/ComAppTestmod.build/Objects-normal/x86_64/Binary/ComAppTestmod normal x86_64
[ERROR] [xcode-sim] 	Ld /Users/lchoudhary/Library/Developer/Xcode/DerivedData/testmod-awzexlutojiwrcgsjrvqzxeidfou/Build/Intermediates.noindex/ArchiveIntermediates/ComAppTestmod/IntermediateBuildFilesPath/testmod.build/Release-iphonesimulator/ComAppTestmod.build/Objects-normal/i386/Binary/ComAppTestmod normal i386
[ERROR] [xcode-sim] (2 failures)

Expected result:

1. Module should be built successfully.

Comments

  1. Ewan Harris 2020-10-02

    [~lchoudhary] I think if you're rebuilding without any changes that's expected, there is some required changes to be made to the module as documented in the release notes http://docs.appcelerator.com/platform/latest/#!/guide/Titanium_SDK_9.2.0_GA_Release_Note-section-src-62558886_TitaniumSDK9.2.0GAReleaseNote-RebuildingiOSmodules
  2. Ewan Harris 2020-10-02

    [~lchoudhary] I'd missed that you were making a swift module. FWIW, I only touched and rebuilt Objective-C modules, and the process I was following is what I'd wrote those steps from. It's probable that there's another step needed for Swift modules, I guess we just need to document it
  3. Vijay Singh 2020-10-02

    I think this is an issue and need to be fixed. Every time sdk get changed the workaround will fail. I think while building module, we have to inject something like https://github.com/appcelerator-modules/titanium-apple-sign-in/blob/92a6db671397073f2dfdeab0b92e3f8db8271ee2/ios/titanium-apple-sign-in.xcodeproj/project.pbxproj#L24 if it is not there in module and log a message to commit this change as it is required. cc [~cwilliams]
  4. Vijay Singh 2020-10-02

    PR - https://github.com/appcelerator/titanium_mobile/pull/12153
  5. Lokesh Choudhary 2020-10-05

    FR Passed. PR Merged.
  6. Sohail Saddique 2020-10-06

    With my environment, listed below, I can build scenarios 2, 3 and 4. However, building a swift module (created with 9.1.0.GA) with 9.2.1.v20201005155347 or 9.3.0.v20201005155027, I get the error: [ERROR] [xcode-sim] ** ARCHIVE FAILED ** I am using Xcode 11.6 so will update to Xcode 12 to double check scenario #1. OS Ver: 10.15.3 Xcode Ver: Xcode 11.6 Appc NPM: 5.0.0 Appc CLI: 8.1.1 Node Ver: 10.17.0
  7. Lokesh Choudhary 2020-10-06

    [~ssaddique], Also make sure you edit the titanium.xcconfig in the ios folder of the module like here: https://github.com/appcelerator-modules/ti.facebook/blob/master/ios/titanium.xcconfig
  8. Lokesh Choudhary 2020-10-06

    Verified the fix with SDK 9.2.1.v20201005155347. Closing.

JSON Source