Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5813] Can't compile hyperloop PHPhotoLibrary module

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2018-07-26T14:31:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop
Labelshyperloop, ios
ReporterDonald Anderson
AssigneeShak Hossain
Created2018-07-26T13:26:11.000+0000
Updated2018-07-26T16:30:41.000+0000

Description

I'm trying to figure out how to access the camera roll in titanium. I started a new project and added this line.
var photos = require('Photos/PHPhotoLibrary');
attempting to run the project fails with this build error.
[ERROR] :  ** BUILD FAILED **
[ERROR] :  The following build commands failed:
[ERROR] :  	CompileC build/Intermediates/hyperloop-photo-album.build/Debug-iphonesimulator/hyperloop-photo-album.build/Objects-normal/x86_64/photos.o /Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album/build/hyperloop/ios/js/photos/photos.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] :  (1 failure)

Comments

  1. Hans Knöchel 2018-07-26

    Hey there! Would you be able to paste the whole trace log? It reveals the actual error a few lines above.
  2. Hans Knöchel 2018-07-26

    The framework import was invalid. It's [PhotoKit](https://developer.apple.com/documentation/photokit/phphotolibrary) instead of Photos.
  3. Donald Anderson 2018-07-26

    I'm getting a different error now.
       Appcelerator Command-Line Interface, version 6.2.1
       Copyright (c) 2014-2018, Appcelerator, Inc.  All Rights Reserved.
       2018-07-26T15:19:09.704Z | TRACE  | set environment to {"registry":"https://software.appcelerator.com","baseurl":"https://platform.appcelerator.com"}
       2018-07-26T15:19:09.707Z | TRACE  | checking credentials for existing session
       2018-07-26T15:19:11.232Z | TRACE  | Attempting to load session info from config file
       2018-07-26T15:19:11.239Z | TRACE  | check if session is invalidated
       2018-07-26T15:19:12.267Z | TRACE  | refresh session expiry to:  1533223152162
       2018-07-26T15:19:12.269Z | TRACE  | session expiry 1533223152162 false
       2018-07-26T15:19:12.270Z | TRACE  | Arrow Cloud config file: /Users/donaldanderson/.acs
       2018-07-26T15:19:12.293Z | TRACE  | found Arrow Cloud login { mid: '50b0e9a8406826b53887b1612cf9153478a0550a',
         publishPort: 443,
         publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
         username: 'donald.anderson@ideagen.com',
         cookie: 
          [ 'connect.sid=s%3Ay3_x_cHLSvAunE4laHu42Wyo23TdKpnc.i2vRoG5YQKLV6js8o%2FRUuavO4XsxAis18lTMVE7nVU8; Path=/; Expires=Thu, 09 Aug 2018 08:27:01 GMT; HttpOnly' ],
         defaultEP: 
          { publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
            publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com
       2018-07-26T15:19:12.294Z | TRACE  | Arrow Cloud cookie expiry [ 1533803221000 ]
       2018-07-26T15:19:12.294Z | TRACE  | session already loaded in opts.session
       2018-07-26T15:19:12.296Z | TRACE  | getCredentials() session:
       {
         "ipaddress": "10.0.12.43",
         "username": "donald.anderson@ideagen.com",
         "password": "<OMITTED>",
         "session": "<OMITTED>",
         "nonce": "<OMITTED>",
         "environment": {
           "name": "production",
           "isProduction": true,
           "acsBaseUrl": "https://api.cloud.appcelerator.com",
           "acsAuthBaseUrl": "https://secure-identity.cloud.appcelerator.com",
           "nodeACSEndpoint": "https://admin.cloudapp-enterprise.appcelerator.com"
         },
         "token": "<OMITTED>",
         "fingerprint": "50b0e9a8406826b53887b1612cf9153478a0550a",
         "fingerprint_description": "Mac OSX Serial Number: C07G3PGUDJD1",
         "org_id": 100106994,
         "expiry": 1533223152162
       }
       2018-07-26T15:19:12.297Z | TRACE  | loading plugins for command "run"
       2018-07-26T15:19:12.735Z | TRACE  | run search paths:
       [
         "/Users/donaldanderson/.appcelerator/install/6.2.1/package",
         "/Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules",
         "/Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album/plugins",
         "/Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album/node_modules",
         "/Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/node_modules",
         "/Users/donaldanderson/Documents/node_modules",
         "/Users/donaldanderson/node_modules",
         "/Users/node_modules",
         "/node_modules",
         "/Users/donaldanderson/.appcelerator/.npm/lib/node_modules"
       ]
       2018-07-26T15:19:12.736Z | DEBUG  | [PLUGIN-LOAD] 0ms /Users/donaldanderson/.appcelerator/install/6.2.1/package/appc.js
       2018-07-26T15:19:14.335Z | DEBUG  | [PLUGIN-LOAD] 1543ms /Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules/appc-cli-titanium/appc.js
       2018-07-26T15:19:14.335Z | DEBUG  | run plugin: /Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules/appc-cli-titanium
       2018-07-26T15:19:14.405Z | DEBUG  | [PLUGIN-LOAD] 28ms /Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules/arrow/appc.js
       2018-07-26T15:19:14.481Z | DEBUG  | run plugin: /Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules/arrow
       2018-07-26T15:19:14.545Z | TRACE  | plugin "arrow" failed its "when" function check, skipping...
       2018-07-26T15:19:14.546Z | TRACE  | loading plugin "titanium" for command "run" CLI options via function
       2018-07-26T15:19:14.573Z | TRACE  | loading plugin "titanium" for command "run" CLI options via array
       2018-07-26T15:19:14.605Z | TRACE  | executing command "run" with the following plugins:
       ["titanium"]
       2018-07-26T15:19:14.610Z | TRACE  | Attempting to load session info from config file
       2018-07-26T15:19:14.612Z | TRACE  | check if session is invalidated
       2018-07-26T15:19:14.809Z | TRACE  | refresh session expiry to:  1533223154711
       2018-07-26T15:19:14.830Z | TRACE  | session expiry 1533223154711 false
       2018-07-26T15:19:14.831Z | TRACE  | session already loaded in opts.session
       2018-07-26T15:19:14.833Z | DEBUG  | Titanium Downloads Last Checked: 1532601275084
       2018-7-26 16:19:28
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 17179869184
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.0.13
       Titanium SDK
         SDK Version                 = 7.2.0.GA
         SDK Path                    = /Users/donaldanderson/Library/Application Support/Titanium/mobilesdk/osx/7.2.0.GA
         Target Platform             = iphone
       Command
         /usr/local/bin/node /Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules/titanium/lib/titanium.js build run --platform ios --log-level trace --sdk 7.2.0.GA --project-dir /Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album --target simulator --ios-version 11.4 --device-family universal --deploy-type development --device-id 5E9E0B1C-623C-4186-B30A-01DAC834660E --skip-js-minify --no-colors --no-progress-bars --no-prompt --prompt-type socket-bundle --prompt-port --config-file /var/folders/bd/tgr7_x6936v37txb0zj9xw4h0000gn/T/build-1532618354831.json --no-banner --project-dir /Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album
       [INFO] :   Found Titanium module id=hyperloop version=3.0.5 platform=iphone deploy-type=development path=/Users/donaldanderson/Library/Application Support/Titanium/modules/iphone/hyperloop/3.0.5
       [INFO] :   Found Titanium plugin id=ti.alloy version=1.0 
       [INFO] :   Deploy type: development
       [INFO] :   Building for target: simulator
       [INFO] :   Building using iOS SDK: 11.4
       [INFO] :   Building for iOS Simulator: iPad (5th generation)
       [INFO] :   Building for device family: universal
       [INFO] :   Team ID: n/a
       [INFO] :   Minimum iOS version: 8.0
       [INFO] :   Logging enabled on port 24848
       [INFO] :   Debugging disabled
       [INFO] :   Profiler disabled
       [INFO] :   Set to copy files instead of symlinking
       [INFO] :   Initializing the build directory
       [INFO] :   Found Alloy app in /Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album/app
       [INFO] :   Executing Alloy compile: /usr/local/bin/node /Users/donaldanderson/.appcelerator/install/6.2.1/package/node_modules/alloy/bin/alloy compile /Users/donaldanderson/Documents/Appcelerator_Studio_Workspace/hyperloop-photo-album/app --config platform=ios,version=0,simtype=none,devicefamily=universal,deploytype=development,target=simulator --no-colors
       [INFO] :   [config.json] config.json unchanged, using cached config.json...
       [INFO] :   ----- MVC GENERATION -----
       [INFO] :   [global style] loading from cache...
       [INFO] :   [index.xml] view processing...
       [INFO] :   style:      "index.tss"
       [INFO] :   view:       "index.xml"
       [INFO] :   controller: "index.js"
       [INFO] :   created:    "Resources/iphone/alloy/controllers/index.js"
       [INFO] :   created:     "Resources/iphone/alloy/styles/index.js"
       [INFO] :   
       [INFO] :   [app.js] using cached app.js...
       [INFO] :   
       [INFO] :   ----- OPTIMIZING -----
       [INFO] :   - iphone/alloy.js
       [INFO] :   - iphone/alloy/sync/localStorage.js
       [INFO] :   - iphone/alloy/sync/properties.js
       [INFO] :   - iphone/alloy/sync/sql.js
       [INFO] :   
       [INFO] :   Alloy compiled in 1.21119s
       [INFO] :   Alloy compiler completed successfully
       [INFO] :   Creating Xcode project
       [INFO] :   Creating Entitlements.plist
       [INFO] :   Creating Info.plist
       [INFO] :   Disabling ATS
       [INFO] :   Creating main.m
       [INFO] :   Creating Xcode config files
       [INFO] :   Copying Titanium libraries
       [INFO] :   Copying Titanium iOS files
       [INFO] :   Installing default LaunchScreen.storyboard
       [INFO] :   Creating debugger and profiler plists
       [INFO] :   Analyzing Resources directory
       [INFO] :   Analyzing platform files
       [INFO] :   Analyzing module files
       [INFO] :   Analyzing localized launch images
       [INFO] :   Analyzing CommonJS modules
       [INFO] :   Creating asset catalog
       [INFO] :   Creating app icon set
       [INFO] :   Creating launch logo image set
       [INFO] :   Creating launch image set
       [INFO] :   Creating assets image set
       [INFO] :   Processing JavaScript files
       [INFO] :   Writing app properties
       [INFO] :   Writing i18n files
       [INFO] :   Processing Titanium symbols
       [INFO] :   Removing files
       [INFO] :   Starting Hyperloop assembly
       [INFO] :   Skipping Hyperloop compile, no usage found ...
       [INFO] :   Finished Hyperloop assembly in 0.01 seconds
       [INFO] :   Skipping xcodebuild
       [INFO] :   Finished building the application in 13s 119ms
       [INFO] :   Launching iOS Simulator
       [INFO] :   hyperloop-photo-album/1.0 (7.2.0.ecae6740fe)
       [ERROR] :  Script Error Couldn't find module: PhotoKit/PHPhotoLibrary for architecture: x86_64
       
    Should hyperloop classes work in a simulator or do I need to run it on a real device?
  4. Donald Anderson 2018-07-26

    I get this error when running it on a real device
       Please manually launch the application
       [INFO] :   hyperloop-photo-album/1.0 (7.2.0.ecae6740fe)
       [ERROR] :  Script Error Couldn't find module: PhotoKit/PHPhotoLibrary for architecture: armv7
       

JSON Source