gurhub / surmagic

🚀 Command Line Tool to create XCFramework for multiple platforms in one shot!
MIT License
310 stars 43 forks source link

'createFramework(verbose:)' caused an unexpected error. #13

Closed sh4wn closed 2 years ago

sh4wn commented 2 years ago

Describe the bug 'createFramework(verbose:)' caused an unexpected error.

To Reproduce Steps to reproduce the behavior:

  1. I run the command 'surmagic xcf'
  2. See error 'createFramework(verbose:)' caused an unexpected error.'

macOS (please complete the following information):

1.2.3


Xcode 13.2.1 Build version 13C100


ProductName: macOS ProductVersion: 12.2 BuildVersion: 21D49


gianpaj commented 2 years ago

I found the issue. I think the command surmagic init has the wrong sdk values

         <array>
             <dict>
                 <key>sdk</key>
-                <string>iphoneos</string>
+                <string>iOS</string>
                 <key>workspace</key>
                 <string>MobilitySDK.xcworkspace</string>
                 <key>scheme</key>
                 <string>xcf</string>
             </dict>
             <dict>
                 <key>sdk</key>
-                <string>iphonesimulator</string>
+                <string>iOSSimulator</string>
                 <key>workspace</key>
                 <string>MobilitySDK.xcworkspace</string>
                 <key>scheme</key>
                 <string>xcf</string>
             </dict>
gianpaj commented 2 years ago

the issue in the code is here: https://github.com/gurhub/surmagic/blob/b0f74b5a889e560bbb577d989f3d26e2f53440d5/surmagic/Sources/surmagic/Target.swift#L28-L29

gurhub commented 2 years ago

The real issue was over here:

https://github.com/gurhub/surmagic/blob/43f564804061842b38e4dff116311fb8bda8863e/surmagic/Sources/surmagic/XCFCommand.swift#L43-L51

This one is just for readability:

https://github.com/gurhub/surmagic/blob/b0f74b5a889e560bbb577d989f3d26e2f53440d5/surmagic/Sources/surmagic/Target.swift#L28-L29

Thank you all for your help. 👍🏻

gurhub commented 2 years ago

Thank you all for your efforts and patience. The "creating template file via init command" issue was fixed in version 1.2.5. https://github.com/gurhub/surmagic/releases/tag/v1.2.5

Also check: https://github.com/gurhub/surmagic#sdk-options

gianpaj commented 2 years ago

nice :)