iOS Question Share to social media functionality - Help with inline objC

henrywood

Active Member
Licensed User
Longtime User
Hey !

I am trying to integrate social sharing functionality in my app through Objective C.

Could someone validate the methology - in particular the Objective C code ?

I would like to get an event in B4i when the user has completed sharing.

UPDATED: 09-05-2015: THIS VERSION DOES NOT WORK - PLEASE SEE POST #101 FOR A WORKING VERSION:
https://www.b4x.com/android/forum/t...elp-with-inline-objc.52849/page-6#post-336177

A BIG THANK YOU TO ALL WHO HELPED ME WITH THIS CODE !

Here is my code:

B4X:
'Code module

Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'Public variables can be accessed from all modules.

End Sub


#If OBJC

- (IBAction)shareToSocialMedia:(NSString *)txt (NSString *)url: (NSString *)image
{
   //NSString *text = @"How to add Facebook and Twitter sharing to an iOS app";
   NSString *text = txt;
   //NSURL *url = [NSURL URLWithString:@"http://roadfiresoftware.com/2014/02/how-to-add-facebook-and-twitter-sharing-to-an-ios-app/"];
   NSURL *url = [NSURL URLWithString:url];
   //UIImage *image = [UIImage imageNamed:@"roadfire-icon-square-200"];
   UIImage *image = [UIImage imageNamed:image];

   UIActivityViewController *controller =
   [[UIActivityViewController alloc]
   initWithActivityItems:@[text, url, image]
   applicationActivities:nil];

  controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,
  UIActivityTypeMessage,
  UIActivityTypeMail,
  UIActivityTypePrint,
  UIActivityTypeCopyToPasteboard,
  UIActivityTypeAssignToContact,
  UIActivityTypeSaveToCameraRoll,
  UIActivityTypeAddToReadingList,
  UIActivityTypePostToFlickr,
  UIActivityTypePostToVimeo,
  UIActivityTypePostToTencentWeibo,
  UIActivityTypeAirDrop];

   [self presentViewController:controller animated:YES completion:^{
     [self sharedone];
   }];
}

- (void)sharedone:
{
   int status = 1;
   [B4IObjectWrapper raiseEvent:self :@"onsharingdone:" :@[@((int)status)]];
   //[B4IObjectWrapper raiseEventFromDifferentThread:self :@"onsharingdone:" :@[@((int)status)]];

}

#end if

Sub onSharingDone(Status As Int)
   Log("onSharingDone: Status = " & Status)
End Sub

Sub ShareToSocialMedia(txt As String, theURL As String, imageFile As String)

   Dim NativeMe As NativeObject = Me
   NativeMe.RunMethod("shareToSocialMedia:", Array As Object(txt, theURL, imageFile))

End Sub
 
Last edited:

Pendrush

Well-Known Member
Licensed User
Longtime User
Non of CODEs posted in this topic is NOT SAFE to use in your app.
App crash when you click on Share button on iPad (iOS 8.3), and my app was rejected on Apple Store.
If someone have iPad with iOS 8.3, maybe to try and test code. I'm unable to test it on iPad.
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Error on iPAD
Application_Start
Application_Active
Error occurred on line: 48 (main)
UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x14688630>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.
Stack Trace: (
CoreFoundation <redacted> + 150
libobjc.A.dylib objc_exception_throw + 38
UIKit <redacted> + 2696
UIKit <redacted> + 1082
UIKit <redacted> + 166
UIKit <redacted> + 308
UIKit <redacted> + 466
CoreFoundation <redacted> + 20
CoreFoundation <redacted> + 276
CoreFoundation <redacted> + 914
CoreFoundation CFRunLoopRunSpecific + 476
CoreFoundation CFRunLoopRunInMode + 106
GraphicsServices GSEventRunModal + 136
UIKit UIApplicationMain + 1440
Share Test main + 108
libdyld.dylib <redacted> + 2
)

Solution on http://stackoverflow.com/a/27189994
If anyone can try to convert it for b4i.
 
Last edited:
Upvote 0

henrywood

Active Member
Licensed User
Longtime User
Something like this maybe:

B4X:
Sub Process_Globals
   Private myPage As Page
End Sub


#IF OBJC

#define SCREEN_WIDTH ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.width :[[UIScreen mainScreen] bounds].size.height)

#define SCREEN_HEIGHT ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.height :[[UIScreen mainScreen] bounds].size.width)

- (void)share2SocialMedia:(NSString *)txt :(NSString *)theurl :(NSString *)theimg
{
  //NSString *text = @"How to add Facebook and Twitter sharing to an iOS app";
  NSString *text = txt;
  //NSURL *url = [NSURL URLWithString:@"http://roadfiresoftware.com/2014/02/how-to-add-facebook-and-twitter-sharing-to-an-ios-app/"];
  NSURL *url = [NSURL URLWithString:theurl];
  //UIImage *image = [UIImage imageNamed:@"roadfire-icon-square-200"];
  UIImage *image;

  if([theimg hasPrefix:@"http://"] || [theimg hasPrefix:@"https://"] ) {
  image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:theimg]]];
  } else {
  image = [UIImage imageNamed:theimg];
  }

  UIActivityViewController *controller =
  [[UIActivityViewController alloc]
  initWithActivityItems:@[text, url, image]
  applicationActivities:nil];

  controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,
  UIActivityTypeMessage,
  UIActivityTypeMail,
  UIActivityTypePrint,
  UIActivityTypeCopyToPasteboard,
  UIActivityTypeAssignToContact,
  UIActivityTypeSaveToCameraRoll,
  UIActivityTypeAddToReadingList,
  UIActivityTypePostToFlickr,
  UIActivityTypePostToVimeo,
  UIActivityTypePostToTencentWeibo,
  UIActivityTypeAirDrop];

  [controller setCompletionHandler:^(NSString*activityType, BOOL completed) {

  // Raise the event for B4i
  if (completed) {
  [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activityType)]];
  } else {

  NSString *activity = @"";
       [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activity)]];
  }
  }];

   //if iPhone
   if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
     [(self._mypage).object presentViewController:controller animated:YES completion:nil];

   } else { //if iPad
    // Change Rect to position Popover
    UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:controller];
    UIWindow *window = [[UIApplication sharedApplication] keyWindow];
    UIView *topView = window.rootViewController.view;
    [popup presentPopoverFromRect:CGRectMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/4, 0, 0)inView:topView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
   }
}

#End If

Sub activity_completed(status As Boolean, T As String)

   'If Main.DEBUG Then
   '  Utils.Log_("onSharingDone: Status = " & status & " - Type: " & T & " - Will look for callback: ShareModule_SharingCompleted in " & myPage.Title)
   'End If

   If SubExists(myPage, "ShareModule_SharingCompleted", 2) = True Then
     CallSub3(myPage, "ShareModule_SharingCompleted", status, T)
   End If

End Sub

Sub ShareToSocialMedia(p As Page, txt As String, theURL As String, imageFileOrURL As String)

   myPage = p
   Dim NativeMe As NativeObject = Me
   NativeMe.RunMethod("share2SocialMedia:::", Array As Object(txt, theURL, imageFileOrURL))

End Sub

Could anyone try to test please ?
 
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Error on compile
Parsing code. 0.03
Compiling code. 0.17
Compiling layouts code. 0.05
Compiling debugger engine code. 1.30
Building Xcode project 0.12
Sending data to remote compiler. Error
Out: Build settings from command line:
ARCHS = armv7
CODE_SIGN_IDENTITY = iPhone
CONFIGURATION_BUILD_DIR = /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload
OTHER_CODE_SIGN_FLAGS = --keychain YYYYY
PRODUCT_NAME = Share Test
PROVISIONING_PROFILE = xxxxxxx

=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
/bin/mkdir -p /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-non-framework-target-headers.hmap
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap
/bin/mkdir -p /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/Share\ Test.LinkFileList
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap
write-file /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test.hmap

Create product structure
/bin/mkdir -p /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/Share\ Test.app

ProcessInfoPlistFile Payload/Share\ Test.app/Info.plist B4iProject/B4iProject-Info.plist
cd /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/B4iProject-Info.plist -genpkginfo /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/Share\ Test.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -o /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/Share\ Test.app/Info.plist

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o B4iProject/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.d --serialize-diagnostics /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.dia -c /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/main.m -o /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o B4iProject/b4i_main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.d --serialize-diagnostics /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.dia -c /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_main.m -o /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o B4iProject/b4i_modshare.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.d --serialize-diagnostics /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.dia -c /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_modshare.m -o /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o
/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_modshare.m:109:51: error: property 'view' not found on object of type 'b4i_modshare *'
[popup presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0)inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
^
/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_modshare.m:109:81: error: property 'view' not found on object of type 'b4i_modshare *'
[popup presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0)inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
^
2 errors generated.

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.o B4iProject/LS_home.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.d --serialize-diagnostics /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.dia -c /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/LS_home.m -o /Users/XXXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.o


Error: ** BUILD FAILED **


The following build commands failed:
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o B4iProject/b4i_modshare.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Almost there. Only one error.

Parsing code. 0.00
Compiling code. 0.03
Compiling layouts code. 0.01
Compiling debugger engine code. 1.06
Building Xcode project 0.02
Sending data to remote compiler. Error
Out: Build settings from command line:
ARCHS = armv7
CODE_SIGN_IDENTITY = iPhone
CONFIGURATION_BUILD_DIR = /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload
OTHER_CODE_SIGN_FLAGS = --keychain YYYYY
PRODUCT_NAME = Share Test
PROVISIONING_PROFILE = xxzzzz

=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
/bin/mkdir -p /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-non-framework-target-headers.hmap
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap
/bin/mkdir -p /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/Share\ Test.LinkFileList
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap
write-file /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test.hmap

Create product structure
/bin/mkdir -p /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/Share\ Test.app

ProcessInfoPlistFile Payload/Share\ Test.app/Info.plist B4iProject/B4iProject-Info.plist
cd /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/B4iProject-Info.plist -genpkginfo /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/Share\ Test.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -o /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/Share\ Test.app/Info.plist

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o B4iProject/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.d --serialize-diagnostics /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.dia -c /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/main.m -o /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o B4iProject/b4i_main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.d --serialize-diagnostics /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.dia -c /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_main.m -o /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o B4iProject/b4i_modshare.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.d --serialize-diagnostics /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.dia -c /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_modshare.m -o /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o
/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/b4i_modshare.m:110:113: error: property '_rootpanel' not found on object of type 'id'
[popup presentPopoverFromRect:CGRectMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/4, 0, 0)inView:(self._mypage).object._rootpanel.object permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
^
1 error generated.

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.o B4iProject/LS_home.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/Payload -F../../Libs -MMD -MT dependencies -MF /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.d --serialize-diagnostics /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.dia -c /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/B4iProject/LS_home.m -o /Users/XXXXX/b4iBuild/UploadedProjects/YYYYY/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.o


Error: ** BUILD FAILED **


The following build commands failed:
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o B4iProject/b4i_modshare.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Share is working on iPad and iPhone, error is in
B4X:
Sub activity_completed(status As Boolean, T As String)

   'If Main.DEBUG Then
   '  Utils.Log_("onSharingDone: Status = " & status & " - Type: " & T & " - Will look for callback: ShareModule_SharingCompleted in " & myPage.Title)
   'End If

   If SubExists(myPage, "ShareModule_SharingCompleted", 2) = True Then
     CallSub3(myPage, "ShareModule_SharingCompleted", status, T)
   End If

End Sub


Application_Start
Application_Active
Error occurred on line: 73 (modshare)
Invalid component: Page (vc): Share Test
Stack Trace: (
CoreFoundation <redacted> + 150
libobjc.A.dylib objc_exception_throw + 38
CoreFoundation <redacted> + 0
Share Test -[B4ICommon getComponentBI:] + 412
Share Test -[B4ICommon SubExists:::] + 100
Share Test -[b4i_modshare _activity_completed::] + 552
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 300
Share Test +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1928
Share Test -[B4IShell runMethod:] + 496
Share Test -[B4IShell raiseEventImpl:method:args::] + 2060
Share Test -[B4IShellBI raiseEvent:event:params:] + 1316
Share Test __36-[b4i_modshare share2SocialMedia:::]_block_invoke + 628
UIKit <redacted> + 130
UIKit <redacted> + 578
UIKit <redacted> + 28
UIKit <redacted> + 42
UIKit <redacted> + 30
UIKit <redacted> + 480
UIKit <redacted> + 52
UIKit <redacted> + 76
UIKit <redacted> + 294
UIKit <redacted> + 668
UIKit <redacted> + 48
UIKit <redacted> + 216
UIKit <redacted> + 2950
UIKit <redacted> + 784
UIKit <redacted> + 520
UIKit <redacted> + 196
UIKit <redacted> + 14538
UIKit <redacted> + 1350
CoreFoundation <redacted> + 14
CoreFoundation <redacted> + 222
CoreFoundation <redacted> + 768
CoreFoundation CFRunLoopRunSpecific + 476
CoreFoundation CFRunLoopRunInMode + 106
GraphicsServices GSEventRunModal + 136
UIKit UIApplicationMain + 1440
Share Test main + 108
libdyld.dylib <redacted> + 2
)



This code also working

B4X:
Sub Process_Globals
   Private myPage As Page
End Sub


#IF OBJC

#define SCREEN_WIDTH ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.width :[[UIScreen mainScreen] bounds].size.height)

#define SCREEN_HEIGHT ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.height :[[UIScreen mainScreen] bounds].size.width)

- (void)share2SocialMedia:(NSString *)txt :(NSString *)theurl :(NSString *)theimg
{
  //NSString *text = @"How to add Facebook and Twitter sharing to an iOS app";
  NSString *text = txt;
  //NSURL *url = [NSURL URLWithString:@"http://roadfiresoftware.com/2014/02/how-to-add-facebook-and-twitter-sharing-to-an-ios-app/"];
  NSURL *url = [NSURL URLWithString:theurl];
  //UIImage *image = [UIImage imageNamed:@"roadfire-icon-square-200"];
  UIImage *image;

  if([theimg hasPrefix:@"http://"] || [theimg hasPrefix:@"https://"] ) {
  image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:theimg]]];
  } else {
  image = [UIImage imageNamed:theimg];
  }

  UIActivityViewController *controller =
  [[UIActivityViewController alloc]
  initWithActivityItems:@[text, url, image]
  applicationActivities:nil];

  controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,
  UIActivityTypeAssignToContact,
  UIActivityTypeSaveToCameraRoll,
  UIActivityTypeAddToReadingList,
  UIActivityTypePostToFlickr,
  UIActivityTypePostToVimeo,
  UIActivityTypePostToTencentWeibo];

  [controller setCompletionHandler:^(NSString*activityType, BOOL completed) {

  // Raise the event for B4i
  if (completed) {
  [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activityType)]];
  } else {

  NSString *activity = @"";
       [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activity)]];
  }
  }];

   //if iPhone
   if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
     [(self._mypage).object presentViewController:controller animated:YES completion:nil];

   } else { //if iPad
    // Change Rect to position Popover
    UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:controller];
    [popup presentPopoverFromRect:CGRectMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/4, 0, 0)inView:(self._mypage).RootPanel.object permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
   }
}

#End If

Sub activity_completed(status As Boolean, T As String)

   'If Main.DEBUG Then
   '  Utils.Log_("onSharingDone: Status = " & status & " - Type: " & T & " - Will look for callback: ShareModule_SharingCompleted in " & myPage.Title)
   'End If

'   If SubExists(myPage, "ShareModule_SharingCompleted", 2) = True Then
'     CallSub3(myPage, "ShareModule_SharingCompleted", status, T)
'   End If

End Sub

Sub ShareToSocialMedia(p As Page, txt As String, theURL As String, imageFileOrURL As String)

   myPage = p
   Dim NativeMe As NativeObject = Me
   NativeMe.RunMethod("share2SocialMedia:::", Array As Object(txt, theURL, imageFileOrURL))

End Sub

But in both code, in iPad portrait popup window is on center horizontally, but on landscape popup window is on left side.
 
Upvote 0

henrywood

Active Member
Licensed User
Longtime User
@Pendrush The code you tried does not have these lines:
B4X:
  UIWindow *window = [[UIApplication sharedApplication] keyWindow];
  UIView *topView = window.rootViewController.view;

so here is the code again:

B4X:
Sub Process_Globals
  Private myPage As Page
End Sub


#IF OBJC

#define SCREEN_WIDTH ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.width :[[UIScreen mainScreen] bounds].size.height)

#define SCREEN_HEIGHT ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.height :[[UIScreen mainScreen] bounds].size.width)

- (void)share2SocialMedia:(NSString *)txt :(NSString *)theurl :(NSString *)theimg
{
  //NSString *text = @"How to add Facebook and Twitter sharing to an iOS app";
  NSString *text = txt;
  //NSURL *url = [NSURL URLWithString:@"http://roadfiresoftware.com/2014/02/how-to-add-facebook-and-twitter-sharing-to-an-ios-app/"];
  NSURL *url = [NSURL URLWithString:theurl];
  //UIImage *image = [UIImage imageNamed:@"roadfire-icon-square-200"];
  UIImage *image;

  if([theimg hasPrefix:@"http://"] || [theimg hasPrefix:@"https://"] ) {
  image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:theimg]]];
  } else {
  image = [UIImage imageNamed:theimg];
  }

  UIActivityViewController *controller =
  [[UIActivityViewController alloc]
  initWithActivityItems:@[text, url, image]
  applicationActivities:nil];

  controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,
  UIActivityTypeMessage,
  UIActivityTypeMail,
  UIActivityTypePrint,
  UIActivityTypeCopyToPasteboard,
  UIActivityTypeAssignToContact,
  UIActivityTypeSaveToCameraRoll,
  UIActivityTypeAddToReadingList,
  UIActivityTypePostToFlickr,
  UIActivityTypePostToVimeo,
  UIActivityTypePostToTencentWeibo,
  UIActivityTypeAirDrop];

  [controller setCompletionHandler:^(NSString*activityType, BOOL completed) {

  // Raise the event for B4i
  if (completed) {
  [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activityType)]];
  } else {

  NSString *activity = @"";
  [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activity)]];
  }
  }];

  //if iPhone
  if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
  [(self._mypage).object presentViewController:controller animated:YES completion:nil];

  } else { //if iPad
  // Change Rect to position Popover
  UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:controller];
  UIWindow *window = [[UIApplication sharedApplication] keyWindow];
  UIView *topView = window.rootViewController.view;
  [popup presentPopoverFromRect:CGRectMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/4, 0, 0)inView:topView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
  }
}

#End If

Sub activity_completed(status As Boolean, T As String)

  'If Main.DEBUG Then
  '  Utils.Log_("onSharingDone: Status = " & status & " - Type: " & T & " - Will look for callback: ShareModule_SharingCompleted in " & myPage.Title)
  'End If

  If SubExists(myPage, "ShareModule_SharingCompleted", 2) = True Then
  CallSub3(myPage, "ShareModule_SharingCompleted", status, T)
  End If

End Sub

Sub ShareToSocialMedia(p As Page, txt As String, theURL As String, imageFileOrURL As String)

  myPage = p
  Dim NativeMe As NativeObject = Me
  NativeMe.RunMethod("share2SocialMedia:::", Array As Object(txt, theURL, imageFileOrURL))

End Sub
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Here is your code, but same thing, popup window is not shown below share button.
Code works as expected, except popup window position.
 

Attachments

  • share_test.zip
    9.8 KB · Views: 346
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
In both cases I have click on first button.
Popup window also have same position if I click second button.
IMG_0226.JPG IMG_0227.JPG
 
Upvote 0

henrywood

Active Member
Licensed User
Longtime User
@Pendrush

Maybe you could try:

B4X:
#IF OBJC

#define SCREEN_WIDTH ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.width :[[UIScreen mainScreen] bounds].size.height)

#define SCREEN_HEIGHT ((([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortrait)||([UIApplication sharedApplication].statusBarOrientation ==UIInterfaceOrientationPortraitUpsideDown))?[[UIScreen mainScreen] bounds].size.height :[[UIScreen mainScreen] bounds].size.width)

- (void)share2SocialMedia:(NSString *)txt :(NSString *)theurl :(NSString *)theimg :(UIView *)SBview
{
  //NSString *text = @"How to add Facebook and Twitter sharing to an iOS app";
  NSString *text = txt;
  //NSURL *url = [NSURL URLWithString:@"http://roadfiresoftware.com/2014/02/how-to-add-facebook-and-twitter-sharing-to-an-ios-app/"];
  NSURL *url = [NSURL URLWithString:theurl];
  //UIImage *image = [UIImage imageNamed:@"roadfire-icon-square-200"];
  UIImage *image;

  if([theimg hasPrefix:@"http://"] || [theimg hasPrefix:@"https://"] ) {
  image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:theimg]]];
  } else {
  image = [UIImage imageNamed:theimg];
  }

  UIActivityViewController *controller =
  [[UIActivityViewController alloc]
  initWithActivityItems:@[text, url, image]
  applicationActivities:nil];

  controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,
  UIActivityTypeMessage,
  UIActivityTypeMail,
  UIActivityTypePrint,
  UIActivityTypeCopyToPasteboard,
  UIActivityTypeAssignToContact,
  UIActivityTypeSaveToCameraRoll,
  UIActivityTypeAddToReadingList,
  UIActivityTypePostToFlickr,
  UIActivityTypePostToVimeo,
  UIActivityTypePostToTencentWeibo,
  UIActivityTypeAirDrop];

  [controller setCompletionHandler:^(NSString*activityType, BOOL completed) {

  // Raise the event for B4i
  if (completed) {
  [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activityType)]];
  } else {

  NSString *activity = @"";
  [self.bi raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activity)]];
  }
  }];

  //if iPhone
  if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
  [(self._mypage).object presentViewController:controller animated:YES completion:nil];

  } else { //if iPad
  // Change Rect to position Popover
  UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:controller];
  //UIWindow *window = [[UIApplication sharedApplication] keyWindow];
  //UIView *topView = window.rootViewController.view;
  [popup presentPopoverFromRect:CGRectMake(SBview.Left, SBview.Top+SBview.Height, SCREEN_WIDTH/2, SCREEN_HEIGHT/4)inView:sbView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
  }
}

#End If

Sub ShareToSocialMedia(p As Page, txt As String, theURL As String, imageFileOrURL As String, shareButton As Button)

  Dim v As View = shareButton
  myPage = p
  Dim NativeMe As NativeObject = Me
  NativeMe.RunMethod("share2SocialMedia::::", Array As Object(txt, theURL, imageFileOrURL, v))

End Sub
 
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Error on compile again
Parsing code. 0.01
Compiling code. 0.04
Compiling layouts code. 0.01
Compiling debugger engine code. 1.03
Building Xcode project 0.01
Sending data to remote compiler. Error
Out: Build settings from command line:
ARCHS = armv7
CODE_SIGN_IDENTITY = iPhone
CONFIGURATION_BUILD_DIR = /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload
OTHER_CODE_SIGN_FLAGS = --keychain XXXXX
PRODUCT_NAME = Share Test
PROVISIONING_PROFILE = xxxxxxx

=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
/bin/mkdir -p /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-non-framework-target-headers.hmap
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap
/bin/mkdir -p /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/Share\ Test.LinkFileList
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap
write-file /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test.hmap

Create product structure
/bin/mkdir -p /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/Share\ Test.app

ProcessInfoPlistFile Payload/Share\ Test.app/Info.plist B4iProject/B4iProject-Info.plist
cd /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-infoPlistUtility /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/B4iProject-Info.plist -genpkginfo /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/Share\ Test.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -o /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/Share\ Test.app/Info.plist

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o B4iProject/b4i_main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload -F../../Libs -MMD -MT dependencies -MF /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.d --serialize-diagnostics /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.dia -c /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/b4i_main.m -o /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o B4iProject/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload -F../../Libs -MMD -MT dependencies -MF /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.d --serialize-diagnostics /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.dia -c /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/main.m -o /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o B4iProject/b4i_modshare.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload -F../../Libs -MMD -MT dependencies -MF /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.d --serialize-diagnostics /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.dia -c /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/b4i_modshare.m -o /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o
/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/b4i_modshare.m:110:44: error: use of undeclared identifier 'SBView'; did you mean 'SBview'?
[popup presentPopoverFromRect:CGRectMake(SBView.Left, SBview.Top+SBview.Height, SCREEN_WIDTH/2, SCREEN_HEIGHT/4)inView:topView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
^~~~~~
SBview
/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/b4i_modshare.m:64:94: note: 'SBview' declared here
- (void)share2SocialMedia:(NSString *)txt :(NSString *)theurl :(NSString *)theimg :(UIView *)SBview
^
1 error generated.

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.o B4iProject/LS_home.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/l1/slt7vrsd5xn8w_n1khzmlq340000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.0 -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-generated-files.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-own-target-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-all-target-headers.hmap -iquote /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Share\ Test-project-headers.hmap -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/Payload -F../../Libs -MMD -MT dependencies -MF /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.d --serialize-diagnostics /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.dia -c /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/B4iProject/LS_home.m -o /Users/YYYYY/b4iBuild/UploadedProjects/XXXXX/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_home.o


Error: ** BUILD FAILED **


The following build commands failed:
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_modshare.o B4iProject/b4i_modshare.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Called with
B4X:
Sub cmdShareLocalImage_Click

    Dim strImagePath As String
    strImagePath = File.DirAssets & "/image.png"
    modShare.ShareToSocialMedia(Page1, "Text for share. Local image.", "https://www.b4x.com", strImagePath, cmdShareLocalImage)

End Sub


Sub cmdShareOnlineImage_Click
     
    modShare.ShareToSocialMedia(Page1, "Text for share. Online image.", "https://www.b4x.com", "https://www.b4x.com/images/b4A_bubble.png", cmdShareOnlineImage)
End Sub
 
Upvote 0

henrywood

Active Member
Licensed User
Longtime User
Typo - SBView should be SBview
You also need to pass in a reference to the cmdShareOnlineImage button as fifth parameter
when calling modShare.ShareToSocialMedia
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Image 1 - first button click
Image 2 - second button click
Popup share is down and a little bit right
 

Attachments

  • IMG_0228.JPG
    IMG_0228.JPG
    47.1 KB · Views: 297
  • IMG_0229.JPG
    IMG_0229.JPG
    44.9 KB · Views: 304
Upvote 0
Top