Coder Social home page Coder Social logo

Comments (6)

hdNguyenPTR avatar hdNguyenPTR commented on July 23, 2024

same problem -

ld: warning: ignoring file /Users/matt/Documents/gitWorkspace/8secondz-ios/8secondz/External/DeepAR.framework/DeepAR, building for iOS Simulator-x86_64 but attempting to link with file built for iOS-arm64
Undefined symbols for architecture x86_64:

from quickstart-ios-swift.

8secz-johndpope avatar 8secz-johndpope commented on July 23, 2024

I'm sure it's possible to combine the two frameworks together - not sure how though.
If not - it's fine I can work around it - instructions aren't clear though.

It seems that the two frameworks included ( one for hardware / one for simulator ) can not / or should not be both imported - ie - if you're building to simulator - use simulator framework / if your building to device rip out simulator and use device framework - which is what I mostly use so not a problem - but need to test something with ios13.

Screen Shot 2020-01-20 at 11 44 32 am

from quickstart-ios-swift.

8secz-johndpope avatar 8secz-johndpope commented on July 23, 2024

Screen Shot 2020-01-29 at 9 59 19 am

so dropping in the simulator frameworks works a treat for dev / both on device + simulator - but not appropriate for app store.
can get around it by creating a new schema target.
developement
prod

from quickstart-ios-swift.

8secz-johndpope avatar 8secz-johndpope commented on July 23, 2024

distantly related -
(actually didn't work so well)
https://gist.github.com/kenthumphries/cf04683184217c7331f9c213c556c65a
https://stackoverflow.com/questions/40400086/xcode-add-embedded-binary-with-buildscript/40484337#40484337

this code successfully signs and includes only for debug builds / framework is weakly linked - it's an awesome pod - worth having a look.
https://raw.githubusercontent.com/CocoaDebug/CocoaDebug/master/CocoaDebug/copy_and_codesign.sh

basically - the answer to this problem
don't include both frameworks / make them weakly linked - then at run time - in build script - determine what to include copy and codesign. I'll take another look when I have more bandwidth.

from quickstart-ios-swift.

mauker avatar mauker commented on July 23, 2024

I believe I went through a few steps in the right direction but even though I managed to select the right frameworks between simulator and production I still have the error

echo "START EMBED DEEP_AR LIB"

MY_PLATFORM_NAME=$PLATFORM_NAME
IS_SIMULATOR="iphonesimulator"

#SELECT THE CORRECT FRAMEWORK BUILT BY SIMULATOR OR NOT
if [ "$MY_PLATFORM_NAME" = "$IS_SIMULATOR" ]; then
        echo 'DEVICE SIMULADOR'
        #ADDRESS OF SIMULATOR FRAMWORK
        FRAME_WORK_CORRECT="track_white_label/Support/NotEmbedLibs/simulator/DeepAR.framework"
else
        echo 'DEVICE REAL'
        #ADDRESS OF OS FRAMWORK
        FRAME_WORK_CORRECT="track_white_label/Support/NotEmbedLibs/release/DeepAR.framework"
fi

#CREATE FOLDER TO PUT THE .framework that will be used by the application
Folder_To=$BUILT_PRODUCTS_DIR"/"$PRODUCT_NAME".app/Frameworks/DeepAR.framework/"
echo "Where to copy =>"$Folder_To
#CREATE ADRESS FROM
Folder_From=$PROJECT_DIR"/"$FRAME_WORK_CORRECT
echo "Where from copy =>"$Folder_From

#CREATE FOLDER TO PUT THE .framework that will be used by the application
mkdir -p $BUILT_PRODUCTS_DIR"/"$PRODUCT_NAME".app/Frameworks"
#COPY FILES, to aplications with space in name is needed to use an extra "" like "$Folder_To
cp -Rv $Folder_From "$Folder_To"


#GET THE IDENTTY TO SIGN
CODE_SIGN_IDENTITY_FOR_ITEMS="${EXPANDED_CODE_SIGN_IDENTITY_NAME}"

if [ "${CODE_SIGN_IDENTITY_FOR_ITEMS}" = "" ] ; then
    CODE_SIGN_IDENTITY_FOR_ITEMS="${CODE_SIGN_IDENTITY}"
fi

#CREATE A METHOD TO ASIGN
codesign_library() {
  if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" ]; then
    codesign -fs "${EXPANDED_CODE_SIGN_IDENTITY}" "$Folder_To"
  fi
}    
  
#ASSIGN IF NECESSARY
if [ "$MY_PLATFORM_NAME" != "$IS_SIMULATOR" ]; then
    codesign_library
fi

echo "FINISH EMBED DEEP_AR LIB"

from quickstart-ios-swift.

JelenaKB avatar JelenaKB commented on July 23, 2024

If you need simulator and production SDKs in the same project you could create two separate targets for them.

Screen Shot 2021-03-15 at 18 54 36

Then you can add the frameworks only to the target that uses them and set up embedding as needed.

from quickstart-ios-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.