iZettle / sdk-ios

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/ios-sdk
Other
82 stars 38 forks source link

Target architecture missing #30

Closed carlosdioxinet closed 8 years ago

carlosdioxinet commented 8 years ago

When i try to build the xcode project i get this:

file is universal (4 slices) but does not contain a(n) armv7s slice: iZettleSDK.framework/iZettleSDK file 'iZettleSDK.framework/iZettleSDK' for architecture armv7s

The same with arm64.

What's wrong?

mansbernhardt commented 8 years ago

As for armv7s see issue #11:

We are using the architectures recommended by Apple. Apparently Apple don’t think adding armv7s has much benefit. From apple dev forums:

The reason for including armv7s would be marginal backward compatibility. But the general differences between armv7 and armv7s instruction sets are minor. So if you choose not to include armv7s, the targeted armv7 machine code still runs fine on 32 bit A6 devices, and hardly one will notice performance gap.

-- Zhou Yang

But that it is missing arm64 sound strange. Which version of the SDK are you using?

carlosdioxinet commented 8 years ago

I'm using v1.1.1 (2015-09-17)

mansbernhardt commented 8 years ago

Just downloaded it and tested:

lipo -info /Users/mansbernhardt/Downloads/sdk-ios-1.1.1/iZettleSDK/iZettleSDK.framework/Versions/A/iZettleSDK Architectures in the fat file: /Users/mansbernhardt/Downloads/sdk-ios-1.1.1/iZettleSDK/iZettleSDK.framework/Versions/A/iZettleSDK are: armv7 i386 x86_64 arm64

carlosdioxinet commented 8 years ago

Here is the console output:

Ld build/device/CulturticketsBoxOffice.app/CulturticketsBoxOffice normal armv7
    cd /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=7.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/carlosleon/.rvm/gems/ruby-2.2.0/bin:/Users/carlosleon/.rvm/gems/ruby-2.2.0@global/bin:/Users/carlosleon/.rvm/rubies/ruby-2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/Users/carlosleon/.rvm/bin:/Users/carlosleon/sources/android-sdk/tools:/Users/carlosleon/sources/android-sdk/platform-tools:/Users/carlosleon/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/device -F/Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/device -FCulturticketsBoxOffice/Plugins/dk.sugee.iZettle -filelist /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/CulturticketsBoxOffice.build/Debug-iphoneos/CulturticketsBoxOffice.build/Objects-normal/armv7/CulturticketsBoxOffice.LinkFileList -miphoneos-version-min=7.1 -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -fobjc-arc -fobjc-link-runtime -framework AssetsLibrary /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/device/libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework iZettleSDK -lz -lc++ -framework SystemConfiguration -framework CoreLocation -framework ExternalAccessory -framework AudioToolbox -framework AVFoundation -framework MediaPlayer -framework QuartzCore -framework Accelerate -framework MessageUI -Xlinker -dependency_info -Xlinker /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/CulturticketsBoxOffice.build/Debug-iphoneos/CulturticketsBoxOffice.build/Objects-normal/armv7/CulturticketsBoxOffice_dependency_info.dat -o /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/device/CulturticketsBoxOffice.app/CulturticketsBoxOffice
Undefined symbols for architecture armv7:
  "_CTFontManagerRegisterGraphicsFont", referenced from:
      -[NSBundle(iZettleStorePurchase) iZettleLoadFontWithName:] in iZettleSDK(NSBundle+iZettleStorePurchase.o)
  "_kEAGLDrawablePropertyRetainedBacking", referenced from:
      -[PaintingView sharedInit] in iZettleSDK(PaintingView.o)
  "_kEAGLDrawablePropertyColorFormat", referenced from:
      -[PaintingView sharedInit] in iZettleSDK(PaintingView.o)
  "_glPointSizePointerOES", referenced from:
      -[PaintingView flushLines] in iZettleSDK(PaintingView.o)
  "_glBindTexture", referenced from:
      -[PaintingView setBrushImage:] in iZettleSDK(PaintingView.o)
  "_glTexParameteri", referenced from:
      -[PaintingView setBrushImage:] in iZettleSDK(PaintingView.o)
  "_glTexImage2D", referenced from:
      -[PaintingView setBrushImage:] in iZettleSDK(PaintingView.o)
  "_glColor4f", referenced from:
      -[PaintingView setBrushColor:] in iZettleSDK(PaintingView.o)
  "_glDeleteTextures", referenced from:
      -[PaintingView cleanup] in iZettleSDK(PaintingView.o)
      -[PaintingView setBrushImage:] in iZettleSDK(PaintingView.o)
  "_glDrawArrays", referenced from:
      -[PaintingView flushLines] in iZettleSDK(PaintingView.o)
  "_CTFramesetterSuggestFrameSizeWithConstraints", referenced from:
      -[UILabel(layout) heightWithWidth:] in iZettleSDK(IZLabel.o)
  "_glClearColor", referenced from:
      -[PaintingView erase] in iZettleSDK(PaintingView.o)
  "_glDeleteFramebuffersOES", referenced from:
      -[PaintingView destroyFramebuffer] in iZettleSDK(PaintingView.o)
  "_glBlendFunc", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glOrthof", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glViewport", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glDisable", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glDeleteRenderbuffersOES", referenced from:
      -[PaintingView destroyFramebuffer] in iZettleSDK(PaintingView.o)
  "_OBJC_CLASS_$_EAGLContext", referenced from:
      objc-class-ref in iZettleSDK(PaintingView.o)
  "_glEnable", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glPointSize", referenced from:
      -[PaintingView flushLines] in iZettleSDK(PaintingView.o)
  "_glGenTextures", referenced from:
      -[PaintingView setBrushImage:] in iZettleSDK(PaintingView.o)
  "_glTexEnvf", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glVertexPointer", referenced from:
      -[PaintingView flushLines] in iZettleSDK(PaintingView.o)
  "_glBindFramebufferOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
      -[PaintingView erase] in iZettleSDK(PaintingView.o)
      -[PaintingView flushLines] in iZettleSDK(PaintingView.o)
  "_glGetRenderbufferParameterivOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glEnableClientState", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glGenRenderbuffersOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glBindRenderbufferOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
      -[PaintingView erase] in iZettleSDK(PaintingView.o)
      -[PaintingView flushLines] in iZettleSDK(PaintingView.o)
  "_CTFramesetterCreateWithAttributedString", referenced from:
      -[UILabel(layout) heightWithWidth:] in iZettleSDK(IZLabel.o)
  "_glMatrixMode", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glRenderbufferStorageOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glFramebufferRenderbufferOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glClear", referenced from:
      -[PaintingView erase] in iZettleSDK(PaintingView.o)
  "_glFinish", referenced from:
      -[PaintingView destroyFramebuffer] in iZettleSDK(PaintingView.o)
  "_kEAGLColorFormatRGBA8", referenced from:
      -[PaintingView sharedInit] in iZettleSDK(PaintingView.o)
  "_glCheckFramebufferStatusOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
  "_glGenFramebuffersOES", referenced from:
      -[PaintingView createFramebuffer] in iZettleSDK(PaintingView.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
    Ld build/device/CulturticketsBoxOffice.app/CulturticketsBoxOffice normal armv7
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/cordova/build-debug.xcconfig,-project,CulturticketsBoxOffice.xcodeproj,ARCHS=armv7 armv7s arm64,-target,CulturticketsBoxOffice,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/build/sharedpch
ERROR building one of the platforms: Error: /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/carlosleon/sources/culturtickets-boxoffice-mobile/platforms/ios/cordova/build: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
mansbernhardt commented 8 years ago

Have you removed arm7s from your app? I would suggest to use the default setting for supported architectures.

Could you run lipo -info on the izettle library you are currently using?

carlosdioxinet commented 8 years ago

lipo command output:

Architectures in the fat file: iZettleSDK are: armv7 i386 x86_64 arm64

I've removed armv7s. Now armv7 is crashing.

mansbernhardt commented 8 years ago

Could you build the sample app? I would suggest you compare your app with that one.

jensutbult commented 8 years ago

@carlosdioxinet is this still an issue?